﻿@{
    ViewBag.Title = "Contact";
}
<script src="~/Scripts/jquery.form.js"></script>
<style>
    .inputfile {
        opacity: 0;
    }
</style>
<script type="text/javascript">
    $(function () {
        $('#file').change(function () {
            $('form').ajaxSubmit({
                url: "../Home/Upload",
                type: 'post',
                success: function (data) {
                    $('img').attr('src', data.pic);
                }
            });
        })
    })
</script>
<form id="form_upload" method="post" action="Upload" enctype="multipart/form-data">
    <input type="file" name="uploadFile" id="file" accept="video/*" class="inputfile" />
    <label for="file" class='btn btn-success'>选择一个视频文件</label>
    <img style="width:300px" />
</form>